package module02.task03;

/**
 * 手机卡类
 *
 * 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量
 * 行为：显示（卡号 + 用户名 + 当前余额）
 */
public class SimCard {
    private String cardType;
    private String accountNumber;
    private String userName;
    private String password;
    private int accountBalance;
    private int airtime;
    private int mobileData;

    public SimCard() {
    }


    public SimCard(String cardType, String cardId, String userName, String password, int accountBalance,
                             int callDuration, int networkData) {
        setCardType(cardType);
        setAccountNumber(cardId);
        setUserName(userName);
        setPassword(password);
        setAccountBalance(accountBalance);
        setAirtime(callDuration);
        setMobileData(networkData);
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getAccountNumber() {
        return accountNumber;
    }

    public void setAccountNumber(String accountNumber) {
        this.accountNumber = accountNumber;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(int accountBalance) {
        this.accountBalance = accountBalance;
    }

    public int getAirtime() {
        return airtime;
    }

    public void setAirtime(int airtime) {
        this.airtime = airtime;
    }

    public int getMobileData() {
        return mobileData;
    }

    public void setMobileData(int mobileData) {
        this.mobileData = mobileData;
    }


    //打印信息
    public void show() {
        System.out.printf("卡号：" +  getAccountNumber());
        System.out.printf("用户名：" +  getUserName());
        System.out.printf("账户余额：" +  getAccountBalance());
    }
}

